package test.my.com.myapplicationtest.cover_guide_view;

import android.app.Activity;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.View;
import android.widget.TextView;

import test.my.com.myapplicationtest.R;

/**
 * Author : cooper
 * Time :  2018/4/16 上午10:49
 * Description : 引导页（内部指定位置弹窗）
 */

public class CoverGuideActivity extends Activity {

    CoverGuideView coverGuideView;
    private TextView tv_content;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.aty_cover_guide_layout);

        coverGuideView = (CoverGuideView) findViewById(R.id.cgv_guide);
        tv_content = (TextView) findViewById(R.id.tv_content);
        final int[] location = new int[2];
        tv_content.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                tv_content.getLocationInWindow(location);
                coverGuideView.showRightGuide(tv_content,location[0],location[1]);
            }
        });
    }
}
